<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<img id="img" src="img/1.jpg" width="100px" height="100px">
		<script type="text/javascript">
			function $(name){
				return document.querySelector(name);
			}
			var img = $("img");
			
			img.onmouseover = function(){
				console.log("鼠标来了");
				this.style.width = "200px";
				this.style.height = "200px";
			}
			img.onmouseout = function(){
				console.log("鼠标走了");
				this.style.width = "100px";
				this.style.height = "100px";
			}
			
		</script>
	</body>
</html>
